package org.smile.design.compose.hyl;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class Folder extends Node{
    private List<Node> nodes = new ArrayList<>();
    private Integer leave;

    public Folder(String name ,Integer leave  ) {
        super(name);
        this.leave=leave;
    }
    @Override
    public void print() {
        super.print();
        if (nodes.size() != 0) {
            for (Node node : nodes) {
                for(int i=0 ; i<leave;i++){
                    System.out.print("-");
                }
                node.print();
            }
        }
    }

}
